package com.sqfw.project.wp.mapper;

import java.util.List;

import com.sqfw.common.utils.Query;
import com.sqfw.project.community.domain.*;
import com.sqfw.project.wp.domain.WpInfo;
import com.sqfw.project.wp.domain.vo.EchartsVO;
import com.sqfw.project.wp.domain.vo.ExportWpInfo;
import com.sqfw.project.wpReport.domain.WpInfoTransfer;
import com.sqfw.project.wpReport.domain.dto.NoLinkDTO;
import com.sqfw.project.wpReport.domain.dto.SeatWorkDTO;
import com.sqfw.project.wpReport.domain.dto.WpInfoDTO;
import com.sqfw.project.wpReport.domain.dto.WpInfoSummaryDTO;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;
import org.springframework.stereotype.Repository;

/**
 * 工单表Mapper接口
 *
 * @author admin
 * @date 2023-06-07
 */
@Repository
public interface WpInfoMapper {
    /**
     * 查询工单表
     *
     * @param scid 工单表主键
     * @return 工单表
     */
    public WpInfo selectWpInfoByScid(String scid);

    /**
     * 查询工单表列表
     *
     * @param wpInfo 工单表
     * @return 工单表集合
     */
    public List<WpInfo> selectWpInfoList(WpInfo wpInfo);


    /**
     * 根据手机号和状态查询关联工单
     * */
    List<WpInfo> selectWpInfoListByPhoneAndNextState(WpInfo wpInfo);

    /**
     * 查询工单表列表, 返回部分字段，由于统计使用
     * @param wpInfo
     * @return
     * */
    List<WpInfo> selectWpInfoListPart(WpInfo wpInfo);

    /**
     * 新增工单表
     *
     * @param wpInfo 工单表
     * @return 结果
     */
    public int insertWpInfo(WpInfo wpInfo);


    public int updateWpInfoCurrWork(WpInfo wpInfo);

    /**
     * 修改工单表
     *
     * @param wpInfo 工单表
     * @return 结果
     */
    public int updateWpInfo(WpInfo wpInfo);

    /**
     * 根据工单号修改工单表(是否声音案例)
     *
     * @param wpid 工单号
     * @return 结果
     */
    public int updateWpInfo2(String wpid);

    /**
     * 删除工单表
     *
     * @param scid 工单表主键
     * @return 结果
     */
    public int deleteWpInfoByScid(String scid);

    /**
     * 批量删除工单表
     *
     * @param scids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteWpInfoByScids(String[] scids);

    public int updateWpInfoByZanCun(WpInfo wpInfo);

    public List<WpInfo> selectWpInfoByPhoneno(String  phoneno);

    public List<WpInfo> selectWpInfoByWpids(List<String> wpids);

    public int updateCbclWpInfo(WpInfo wpInfo);

    public WpInfo selectWpInfoByWpId(String wpid);

    public int updateWpinfoRead(WpInfo wpInfo);

    public List<WpInfo> selectProcessedWpInfoList(WpInfo wpInfo);

    public List<WpInfo> selectReviewerWpInfoList(WpInfo wpInfo);

    public int updateDelFlag(WpInfo wpInfo);

    public List<EchartsVO> getWpInfoEcharts(@Param("localDates") List<String> localDates);

    public List<WpInfo> selectReviewerUntreatedList(WpInfo wpInfo);

    public List<WpInfo> getWpInfoSummaryList(WpInfoSummaryDTO wpInfoSummaryDTO);

    public List<WpInfo> selectWpInfoCountListByWpids(WpInfo wpInfo);


    public List<WpInfo> getWpInfoListTransferList(WpInfoTransfer wpInfoTransfer);

    public List<WpInfo> getWpInfoListByDTO(WpInfoDTO wpInfoDTO);

    public List<SeatWorkDTO> selectWpInfoListByReport(WpInfo wpInfo);

    public List<WpInfoDTO> countWpInfoGroupByScidType(WpInfo wpInfo);

    public Integer countWpInfoDictData(WpInfo wpInfo);

    public List<String> getManageWpListAll(WpInfo wpInfo);

    public List<ExportWpInfo> exportWpInfos(WpInfo wpInfo);

    public List<WpInfoDTO> countWpInfoGroupByIsTransfer(WpInfo wpInfo);

    public List<WpInfo> selectWpinfoByDept(WpInfo wpInfo);

    public List<WpInfo> selectWpinfoByDeptAndHfState(WpInfo wpInfo);

    public String selectWpInfoSeqScid();

    public Integer editRevokeWpInfo(WpInfo wpInfo);

    List<WpInfo> testOrderBy(WpInfo wpInfo);

    String findWpInfoByPhoneNew(String phoneno);

    List<WpInfo> selectWpInfoByWpidsOrderBy(WpInfo infoCon);

    List<WpInfo> selectWpInfoByClassAndWpType(WpInfo wpInfo);

    List<WpInfo> selectCountWpInfoByWpType(WpInfo wpInfo);

    Integer selectWpInfoListByScidType(WpInfo wpInfo);


    List<WpInfo> selectProcessedCBWpInfoList(WpInfo wpInfo);

    List<WpInfo> selectWpBackInfoList(WpInfo wpInfo);

    /**
     * 签名工单手机号
     * */
    List<WpInfo> selectByStarttime(WpInfo wpInfo);

    List<String> selectDisposeCauseList(WpInfo wpInfo);

    /**
     * 根据工单号 判断工单是否存在
     * */
    int countWpInfoByWpId(String wpid);

    List<WpInfo> getVistWpInfoList(WpInfo wpInfo);

    void updateWpInfoSendSatis(WpInfo wpInfo);

    List<WpInfoAppointDO> orderListAppoint(@Param("query") Query queryMap);

    Integer orderListAppointTotal(@Param("query") Query queryMap);

    List<WpHandleLogDO> orderTimeQuerySingle(WpTraceBO wpTrace);

    List<WpVisitInfoDO> orderSatisfiedQuerySingle(WpTraceBO wpTrace);

    WpInfoBO getOnlyWpInfo(WpTraceBO wpTrace);

    List<WpInfo> countWpInfoAll(WpInfo wpInfo);

    void updateWpInfo3(String wpid);

    void updateSendSmsState(WpInfo wpInfo);

    int updateVistSmsState(WpInfo wpInfo);

    Integer countPhoneBack(WpInfo wpInfo);

    List<NoLinkDTO> countNoLink(WpInfo wpInfo);

    Integer countA(WpInfo wpInfo);

    Integer countE(WpInfo wpInfo);

    Integer countF2(WpInfo infoCon);
    Integer countF(WpInfo infoCon);

    Integer countTsWpid(WpInfo wpInfo);

    Integer countWpInfoByPhoneno(String phoneno);

    Integer countL(WpInfo infoCon);

    Integer creatCount(WpInfo infoCon);

    int creatAllCount(WpInfo infoCon);

    int creatCountByMoth(WpInfo infoCon);

    Integer countAByMoth(WpInfo infoCon);

    Integer countEByMoth(WpInfo infoCon);

    Integer countFByMoth2(WpInfo infoCon);

    Integer countFByMoth(WpInfo infoCon);

    Integer countPhoneBackByMoth(WpInfo infoCon);

    List<NoLinkDTO> countNoLinkByMoth(WpInfo infoCon);

    Integer countLByMoth(WpInfo infoCon);

    int creatAllCountByMoth(WpInfo infoCon);

    int countHHByMoth(WpInfo infoCon);

    int countHH(WpInfo infoCon);

    void updateWpInfoSoundCase(WpInfo wpInfo);

    int extensionWpinfoEdit(WpInfo wpInfo);

    List<WpInfo> organizerList(WpInfo wpInfo);

    List<WpInfo> selectWpInfoListByDeptAndStarttime(WpInfo wpInfo);


    int updateWpInfoTimeBoundry(WpInfo info);

    List<String> creatCountWpidsByMoth(WpInfo infoCon);

    int updateMainDeptByScid(WpInfo wpInfo);

    int updateWpInfoSatis(WpInfo wpInfo);


    List<String> selectManageWpListAll(WpInfo wpInfo);
}
